define(function() {
    return ['$scope','$location', '$interval','$timeout','$route','bizProxy', function($scope,$location,$interval,$timeout,$route,bizProxy) {
		$scope.$emit("top-show",'true');//顶部显示
    	$scope.$emit('menuTypeLight','mine'); 	//控制底部menu高亮
    	$scope.$emit('bub-menu','true'); 	//隐藏底部menu
    	$scope.$emit('flag-tag','54');//显示底部文字
    	
    	//默认显示收益列表
    	var funsList = new Array();
    	$scope.isShou = false;$scope.isFen = true;
    	queryFunsList();
    	
    	//点击收益列表
    	$scope.incomeClick = function(){
    		$scope.isShou = true;$scope.isFen = false;
    		$scope.funsUserList = funsList;
    	}
    	
    	//点击粉丝列表
    	$scope.funsClick = function(){
    		$scope.isShou = false;$scope.isFen = true;
    	}
    	
    	//查询粉丝列表
    	function queryFunsList(){
    		var headerInfo = {},bizInfo = {};
        	headerInfo.pageNum = '';
        	headerInfo.pageSize = '';
        	headerInfo.sessionId = transData.sessionId;
        	
        	$scope.$emit("loadingChange",true);
        	bizProxy.queryProxyBizData('queryFunsUser',headerInfo,bizInfo,
    				function(tempData){//SUCCESS
        				$scope.$emit("loadingChange",false);
//        				alert("tempData="+JSON.stringify(tempData))
		        		$timeout(function(){
		        			var list = JSON.parse(tempData.body);
		        			funsList = list.funsUserList;
	        				$scope.funsUserList = funsList;
	        				$scope.funsNum = funsList.length;
		        		},0);
		    		},function(data){
		    			$scope.$emit("loadingChange",false);
		    			$scope.funsNum = 0;
		    			$scope.funsUserList = "";
		    			if(data != ""){//FAIL
								$scope.$emit("promptAlertMsg",data.errorMsg);
				        		$scope.$emit("showCollect",true);
								$timeout(function(){
									$scope.$emit("showCollect",false);
								},1500);
		    			}else{
		    				$scope.$emit("promptAlertMsg","查询粉丝超时");
			        		$scope.$emit("showCollect",true);
							$timeout(function(){
								$scope.$emit("showCollect",false);
							},1500);
		    			}
		    		});
    	}
        $scope.$apply();
    }];
});